// SectionSet.cpp : implementation file
//

#include "stdafx.h"
#include "ex31c.h"
#include "SectionSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSectionSet

IMPLEMENT_DYNAMIC(CSectionSet, CRecordset)

CSectionSet::CSectionSet(CDatabase* pdb)
	: CRecordset(pdb)
{
	m_nParams=1;
	//{{AFX_FIELD_INIT(CSectionSet)
	m_CourseID = _T("");
	m_SectionNo = _T("");
	m_InstructorID = _T("");
	m_RoomNo = _T("");
	m_Schedule = _T("");
	m_Capacity = 0;
	m_nFields = 6;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}


CString CSectionSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=Student Registration");
}

CString CSectionSet::GetDefaultSQL()
{
	return _T("[Section]");
}

void CSectionSet::DoFieldExchange(CFieldExchange* pFX)
{
	pFX->SetFieldType(CFieldExchange::param);
	RFX_Text(pFX, "Param", m_InstructorIDParam); // Any name will do

	//{{AFX_FIELD_MAP(CSectionSet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[CourseID]"), m_CourseID);
	RFX_Text(pFX, _T("[SectionNo]"), m_SectionNo);
	RFX_Text(pFX, _T("[InstructorID]"), m_InstructorID);
	RFX_Text(pFX, _T("[RoomNo]"), m_RoomNo);
	RFX_Text(pFX, _T("[Schedule]"), m_Schedule);
	RFX_Int(pFX, _T("[Capacity]"), m_Capacity);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CSectionSet diagnostics

#ifdef _DEBUG
void CSectionSet::AssertValid() const
{
	CRecordset::AssertValid();
}

void CSectionSet::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG
